<?php

Yii::import('application.models._base.BaseSection');

class Section extends BaseSection
{
	public static function model($className=__CLASS__) {
		return parent::model($className);
	}
    public function getFindSection($section_code){
        return $this->find('section_code=:section_code',array(':section_code'=>$section_code));
    }
    public function getSection(){
        $data = Yii::app()->db->createCommand()
            ->select('section_code,title')
            ->from('{{section}}')
            ->where('type=:type',array(':type'=>1))
            ->queryAll();
        return $data;
    }
}